package com.ran.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.util.Date;
import java.text.SimpleDateFormat;

@TableName("record")
public class UserStatus {
    private static final  long serialVersionUID=1L;

    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;
    private String statuss;
    private String username;
    private LocalDateTime nowtime;

    public UserStatus() {
    }

    public UserStatus(Integer id, String status, String username, LocalDateTime time) {
        this.id = id;
        this.statuss = status;
        this.username = username;
        this.nowtime = time;
    }

    public Integer getId() {
        return id;
    }

    public UserStatus(String statuss, String username, LocalDateTime nowtime) {
        this.statuss = statuss;
        this.username = username;
        this.nowtime = nowtime;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStatus() {
        return statuss;
    }

    public void setStatus(String status) {
        this.statuss = status;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public LocalDateTime getTime() {
        return nowtime;
    }

    public void setTime(LocalDateTime time) {
        this.nowtime = time;
    }

    @Override
    public String toString() {
//        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return "UserStatus{" +
                "id=" + id +
                ", status='" + statuss + '\'' +
                ", username='" + username + '\'' +
                ", time=" + nowtime +
                '}';
    }
}
